﻿<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>正在进入</title>
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<link rel="stylesheet" href="./css/weui.min.css"/>
	<link rel="stylesheet" href="./css/app.css"/>

	<script type="text/javascript">
		(function(win) {
			var screenWidth =  parseInt(window.screen.width),
					screenHeight =  parseInt(window.screen.height);
			var phoneScale = screenWidth/640;
			var ua = navigator.userAgent;
			if (/Android (\d+\.\d+)/.test(ua)){
				var version = parseFloat(RegExp.$1);
				if(version>2.3){
					document.write('<meta name="viewport" content="width=640, minimum-scale = '+phoneScale+', maximum-scale = '+phoneScale+', target-densitydpi=device-dpi">');
				}else{
					document.write('<meta name="viewport" content="width=640, target-densitydpi=device-dpi">');
				}
				// 其他系统
			} else {
				document.write('<meta name="viewport" content="width=640, user-scalable=no, target-densitydpi=device-dpi">');
			};
			var doc = win.document;
			var docEl = doc.documentElement;
			var tid;
			function refreshRem() {
				var width = docEl.getBoundingClientRect().width,
						height = docEl.getBoundingClientRect().height;
				if (width > 640) { // 最大宽度
					width = 640;
				}
				var rem = width / 10; // 将屏幕宽度分成10份， 1份为1rem
				docEl.style.fontSize = rem + 'px';
//                if(screenWidth/screenHeight>320/490){
//                    docEl.style.fontSize = 64*(320/490)/(screenWidth/screenHeight)+'px';
//                }
				console.log(docEl.style.fontSize);
			}
			win.addEventListener('resize', function() {
				clearTimeout(tid);
				tid = setTimeout(refreshRem, 300);
			}, false);
			win.addEventListener('pageshow', function(e) {
				if (e.persisted) {
					clearTimeout(tid);
					tid = setTimeout(refreshRem, 300);
				}
			}, false);
			refreshRem();
		})(window);

	</script>
	<script type="text/javascript">
		var apiHost = 'http://test.api.muzhibuluo.com';
		//var apiHost = 'http://api.m.muzhi.us';
		var commonUrl = apiHost+'/api/imusic_s09e01';
		//var commonUrl = "http://test.api.muzhibuluo.com/api/meizu_s02e01";

//		var auth_url = "http://test.m.muzhibuluo.com/auth/anonymous/login";
		var auth_url = "/auth/wechat/login";
		var ua = window.navigator.userAgent.toLowerCase();
		if(ua.match(/MicroMessenger/i) == 'micromessenger'){
		}else{
			auth_url = '/auth/anonymous/login';
		}
//		auth_url = "http://test.m.muzhibuluo.com/auth/anonymous/login";
		var lotteryNum = 0;
		var lotteryFlag = false;
		var infoFlag = 0;
		var prize = null;
		var prize_address = {};
		var arr = location.href.split("#")[0].split("/");
		var indexUrl = location.href.split("#")[0];
		var loadComplete = false;
		var nickname = "";
		arr[arr.length-1] = "";
		window["shareObj"] = {
			title:"音乐直播间密室逃脱",
			iconstr:arr.join("/")+"images/share_icon.png"
		};
	</script>
</head>
<body ontouchstart>
<div class="music_ctrl on" style="display: none;"></div>
<div class="container" id="container">

</div>
<div class="share_mask" style="z-index: 1">
<img src="images/app_logo2.png" style="display: none">
</div>
<div class="mask" style="display: none;"></div>
<div class="win_alert" style="display: none">
	<div style="position: relative;width: 100%;height: 100%;">
		<span id="alert_tip">请选择同意《会员服务条款》</span>
		<span class="alert_cancel">取消</span>
	</div>
</div>
<div class="btn btn_play_again" onclick="$('.alert_cancel').click();location.hash='#/game';" style="position: fixed;top:70%;left:50%;margin-left: -134px;display: none;">再玩一次</div>
<div class="btn btn_go_share btn_go_share2" onclick=" $('.share_mask').show();" style="position: fixed;top:85%;left:50%;margin-left: -134px;display: none;">炫耀一下</div>
<script type="text/html" id="tpl_startup">

</script>
<script type="text/html" id="tpl_home">
	<iframe src="game.html" style="width: 100%;height: 100%;border: 0;"></iframe>
</script>
<script type="text/html" id="tpl_game_end">
<div class="game_end_text">
	恭喜你成功走出密室！<br/>
	仅用时：<span style="color: #00fefb"><span id="spend_time"></span>S</span>，去炫耀一下
</div>

<div class="btn btn_go_lottery">去领奖</div>

<div class="btn btn_go_share">炫耀一下</div>
</script>
<script type="text/html" id="tpl_lottery">
	<div class="pkg_box">
		<div class="rotate_light"></div>
		<!--<div class="pkg"></div>-->
		<!--<div class="pkg_closed"></div>-->
		<!--<div class="pkg_opened" style="display: none"></div>-->
		<div class="logo"></div>
	</div>

	<div class="btn btn_rule">活动规则</div>
	<div class="copyright">天翼爱音乐制作出品</div>
	<div class="rule" style="display: none;">
		<div style="width: 100%;position: relative;padding-top: 105px;">
			<span class="rule_close">X</span>
			<span class="rule_return">返回</span>
			<div class="rule_text">
				<div class="rule_text_img"></div>
			</div>
		</div>

	</div>
</script>
<script type="text/html" id="tpl_tip">

</script>
<script type="text/html" id="tpl_prize">
<div class="win_no_prize" style="display: none;">
	<div class="no_prize"></div>
	<div class="btn btn_music_list" style="display: none;">歌单</div>
	<div class="btn no_prize_return">返回</div>
</div>
<div class="get_prize_success" style="display: none;">
	<div class="get_prize_success_text">
		恭喜你登记成功<br/>
		奖品将在活动结束后<br/>
		10个工作日内发放
	</div>
	<div class="btn btn_get_prize_success_confirm">确认</div>

	<div class="btn btn_get_prize_success_share">炫耀一下</div>

</div>
<div class="member_rule" style="display: none;">
	<div style="width: 100%;position: relative;padding-top: 105px;">
		<span class="member_rule_close">X</span>
		<span class="member_rule_return">返回</span>
		<div class="member_rule_text">
			<div class="member_rule_text_img"></div>
		</div>
	</div>
</div>
<div class="get_member_success" style="display: none;">
	<div class="get_prize_success_text" style="margin-top: -2rem;width: 350px;margin-left: -175px;">
		开通钻石会员，资费10元/月，连续使用2个月，活动结束后每月15日前各返10元话费。
	</div>
	<div class="btn btn_get_prize_success_confirm">确认</div>

	<div class="btn btn_get_prize_success_share">炫耀一下</div>

</div>
<div class="win_music_box" style="display: none;">
	<div class="music_box">
		<ul id="music_box_list">

		</ul>
		<div class="btn btn_get_music1" style="bottom: -30%;">确认订购</div>
		<span class="music_cancel" style="bottom: -45%;" onclick="window.location.hash='#/lottery';">取消</span>
	</div>
	<div class="get_music_form" style="display: none;">
		<div style="position: relative">
			<input type="text" placeholder="请输入天翼手机号码" style="position: absolute;top: 203px;left: 80px;" id="phone_get_music"/>
			<input type="text" placeholder="请输入验证码" style="position: absolute;top: 284px;left: 80px;width: 200px;" id="code_get_music" onkeyup="this.value=this.value.substr(0,8);"/>
			<span class="get_prize_validcode sendValidCode_get_music" style="right: 57px;top: 296px;font-size: .4rem;display: inline-block;width: 110px;text-align: center;color: #fff;font-weight: 100;">验证码</span>
			<span class="show_member_rule" style="bottom: -421px;left:140px;background: #f7e5c9;width: 247px;font-size: .35rem;color: #79654b;">
				同意《会员服务条款》并成为爱音乐普通会员
			</span>
		</div>
		<span class="prize_radio radio3" data-status="1" style="left: 104px;top: 376px;">
			<span class="radio_color"></span>
		</span>
		<div class="btn btn_get_music" style="bottom: -30%;">确认订购</div>
		<span class="music_cancel" style="bottom: -48%;">取消</span>
	</div>
	<div class="get_music_no_subscribe" style="display: none;">
		<div class="btn btn_get_music_subscribe" style="bottom: -50%;">确认开通</div>
		<span class="music_cancel" style="bottom: -90%;color: #ff444b">取消</span>
	</div>
	<div class="get_music_confirm" style="display: none;">
		<div class="btn btn_get_music_confirm" style="bottom: -50%;">确认开通</div>
		<span class="music_cancel" style="bottom: -90%;color: #ff444b">取消</span>
	</div>
	<div class="get_music_success" style="display: none;position: relative">
		<div class="get_prize_success_text" style="margin-top: -3rem;width: 350px;margin-left: -175px;">
			已成功办理音乐盒<br/>
			活动结束后10个工作日内将返还5元话费，本月如未退订，下月自动续费，每月5元<br/>
		</div>
		<div class="btn btn_get_prize_success_confirm" style="bottom: -270px;">确认</div>
		<div class="btn btn_get_prize_success_share" style="bottom: -450px">炫耀一下</div>
	</div>
</div>
<!--优惠券-->
<div class="win_prize_code" style="display: none">
	<div class="prize_code">
		<div style="position: relative;height: 100%;">
			<span class="code_num"></span><br/>
			<span class="code_usage">使用说明</span>
		</div>
		<div class="btn btn_get_prize_success_share" style="bottom: -38%;">炫耀一下</div>
		<span class="prize_cancel" style="bottom: -57%;color: #db9a0a;">取消</span>

	</div>
	<div class="jd_usage_rule" style="display: none;">
		<div style="width: 100%;position: relative;padding-top: 105px;">
			<span class="jd_rule_close">X</span>
			<span class="jd_rule_return" style="bottom: -58px">返回</span>
			<div class="rule_text" style="height: 700px;">
				<div class="rule_text_img" style=" background: url(./images/app_jd_usage2.png) no-repeat;height: 1010px;"></div>
			</div>
		</div>

	</div>
</div>
<div class="win_get_prize" style="display: none;">
	<div class="get_prize prize_balance" style="display: none;">
		<span class="prize_name"></span>
		<div class="get_prize_form" style="margin-top: 19px;">
			<input type="text" placeholder="请输入手机号码" style="position: absolute;top:52px;" id="phone_balance"/>
			<input type="text" placeholder="请输入验证码" onkeyup="this.value=this.value.substr(0,8);" style="position: absolute;top:132px;width: 200px;" id="code_balance"/>
			<span class="get_prize_validcode"></span>
			<span class="show_member_rule" style="display:none;bottom: -265px;left: 93px;color:#76684f;font-size: .35rem;width: 268px;">同意《会员服务条款》并成为爱音乐普通会员</span>
		</div>
		<span class="prize_radio radio1" data-status="1" style="display: none">
			<span class="radio_color"></span>
		</span>
		<span class="prize_cancel" style="color: #ff6e2d;bottom: -240px;">取消</span>
	</div>
	<div class="get_prize prize_member" style="display: none;">
		<div class="get_prize_form">
			<input type="text" placeholder="请输入天翼手机号码" style="position: absolute;top:192px;" id="phone_member"/>
			<input type="text" placeholder="请输入验证码" style="position: absolute;top:257px;width: 200px;" id="code_member" onkeyup="this.value=this.value.substr(0,8);"/>
			<span class="get_prize_validcode sendValidCode" style="right: 34px;bottom: -304px;font-size: .4rem;display: inline-block;width: 110px;text-align: center;">验证码</span>
			<span class="show_member_rule"></span>
		</div>
		<span class="prize_radio radio2" data-status="1" style="left: 121px;bottom: 34px;">
			<span class="radio_color"></span>
		</span>
		<span class="prize_cancel">取消</span>
	</div>
	<div class="btn btn_get_prize">确认领取</div>
</div>

<div class="win_confirm_member" style="display: none;">
	<div class="confirm_member">

	</div>
	<div class="btn btn_get_member_confirm" style="bottom: 23%">确认订购</div>
	<span class="member_cancel" style="bottom: 13%">取消</span>
</div>
</script>
<script type="text/html" id="tpl_share">
	<div class="hd">
		<h1 class="page_title">Button</h1>
	</div>
	<div class="bd spacing">
		<a href="javascript:;" class="weui_btn weui_btn_primary">按钮</a>
		<a href="javascript:;" class="weui_btn weui_btn_disabled weui_btn_primary">按钮</a>
		<a href="javascript:;" class="weui_btn weui_btn_warn">确认</a>
		<a href="javascript:;" class="weui_btn weui_btn_disabled weui_btn_warn">确认</a>
		<a href="javascript:;" class="weui_btn weui_btn_default">按钮</a>
		<a href="javascript:;" class="weui_btn weui_btn_disabled weui_btn_default">按钮</a>
		<div class="button_sp_area">
			<a href="javascript:;" class="weui_btn weui_btn_plain_default">按钮</a>
			<a href="javascript:;" class="weui_btn weui_btn_plain_primary">按钮</a>

			<a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_primary">按钮</a>
			<a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_default">按钮</a>
		</div>
	</div>
</script>
<script src="./js/zepto.min.js"></script>
<script src="./js/jquery-2.1.1.min.js"></script>
<script src="./js/router.min.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="./js/app.js"></script>
</body>
</html>